const router = require('koa-router')() //引入路由函数
const imageController = require('../controller/allowance')

/**
 * @swagger
 * definitions:
 *   getFile:
 */
/**
 * @swagger
 * /images/getFiles:
 *   get:
 *     tags:
 *       - images
 *     description: getFiles
 *     produces:
 *       - application/json
 *     responses:
 *       200:
 *         description: Successfully created
 */
router.post('/images/getFiles', imageController.getFileList)
router.post('/images/upload', imageController.uploadImage)
router.post('/images/delete', imageController.deleteImage)
router.post('/images/getDetail', imageController.getImageDetail)
router.get('/images/getFolderVer', imageController.getFolderVer)
router.post('/images/setTag', imageController.setTag)
router.post('/images/removeTag', imageController.removeTag)
router.post('/images/processImage', imageController.processImage)
router.get('/images/getTagList/:fileName', imageController.getTagList)
router.get('/images/getTagList', imageController.getTagList)
module.exports = router;
